Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Timestamp conversion

Morning,

I would like to convert the following date to YYYYMM but am struggling to find the right format:

31JAN2015:00:00:00

I have searched on the community but have not come across the right example. Has anyone converted this type of timestamp yet?

Thank you,

L

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

Date(MonthStart(Date#(Left(Trim(TimeStampField), 9), 'DDMMMYYYY')), 'YYYYMM') as TimeStampField

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Is it coming from Field or just this value only?

You may try like this?

=date(date#(YourField, 'NativeFormat'),'RequiredFormat')

sunny_talwar

May be try this:

Date(MonthStart(Date#(Left(Trim(TimeStampField), 9), 'DDMMMYYYY')), 'YYYYMM') as TimeStampField

settu_periasamy
Master III
Master III

Hi,

Try this..

=Date(Date#('31JAN2015:00:00:00','DDMMMYYYY:hh:mm:ss'),'YYYYMM')

sunny_talwar

I would suggest using MonthStart or MonthEnd because if you don't then may be you still see YYYYMM, it would still show up as multiple entries in list box or straight table because the date can still be different. With MonthStart we will essentially making all the dates within that month equal to 1.

settu_periasamy
Master III
Master III

Thanks sunindia‌  Noted. i will keep it..

Not applicable
Author

Thank you Sunny That worked perfectly!

sunny_talwar

Not a problem. I am glad I was able to help