HomeForum
Welcome, Guest

Date manipulation in masks
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Date manipulation in masks

Date manipulation in masks 1 year, 1 month ago #2414

  • Ian
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
Support,

You were very good in helping with the mask in file names using functions in
the system. See below:

\\Rptsvra\pir\EMU\FTP\GIS
downloads\CW-RepComp-{LeftString(GETSYSTEMVARIABLE('SYSTEM_DATE'),8)}.csv

Will

\\Rptsvra\pir\EMU\FTP\GIS
downloads\CW-RepComp-{LeftString(GETSYSTEMVARIABLE('SYSTEM_DATE')-1,8)}.csv

Give me the day before the current date?

Thanks!
Ian

Re: Date manipulation in masks 1 year, 1 month ago #2415

  • admin
  • OFFLINE
  • Moderator
  • Posts: 2191
  • Karma: 12
Hi

It will give you an error becase GETSYSTEMVARIABLE('SYSTEM_DATE') returs a string

Use DecDateS

Mike

DecDateS

DecDateS(Date,Format,ChangeType,Decrement):String.

ChangeType: YEAR,MONTH,WEEK,DAY,HOUR,MINUTE,SECOND

Use DecDateS to Decrease ChangeType part of a date value by an Decrement.

DecDateS ('01012003','DDMMYYYY', 'YEAR',1)

Re: Date manipulation in masks 1 year, 1 month ago #2416

  • Ian
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
\\Rptsvra\pir\EMU\FTP\GIS downloads\CW-RepComp-{DecDateS (LeftString(GETSYSTEMVARIABLE('SYSTEM_DATE'),8),'YYYYMMDD', 'DAY',1)}.csv

So this should give me:

Today: 20070525
Output: 20070524
Does this seem correct?

Charles
  • Page:
  • 1
Time to create page: 0.15 seconds

Testimonials

"AETL is a perfect fit for our requirements as it offers process automation and integration in one single package. This initiative has helped us to improve our business process efficiency and timeliness."

Sue K,
Online Logistics

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top