secs2date format

I thought this format returned the date format without any separators  ... but it doesn't 

textDate = secs2date(DT,-2,"")					// "YYYYMMDD"

What is the correct format for secs2date to obtain this format YYYYMMDD?

 

 

johnweeks

What you assume is quite reasonable- it should work that way. Looking at the source code shows that fixing it is surprisingly complicated, as the underlying code is used in a number of places, and we would have to be careful to make sure those other uses didn't break. I have entered a ticket for the change.

KZarzana

Edit: See John's comment above.

This will work:

textdate=ReplaceString("-", secs2date(DT,-2), "")

The Help says that if the separate str is omitted, then it defaults to "-", so my guess is that it's treating an empty string the same as an omitted string.  Perhaps one of the WaveMetrics folks can chime in.