- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have a date variable which I want to display like this YYYYMMDD:HH:MM. I don't want to display the seconds value. I am not able to find any date time format which will help me in the above scenario.
Can anyone tell me how to do this. Do we have any format available to do this?
id date
101 2021-01-21:15:25
102 2021-02-15:08:30
...
Shantanu
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Format datetime14. will not display seconds.
Format e8601dt16. will not display seconds.
And probably many others...
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
But if I want the complete year then what should we do. Because using datetime14. will give the year values in 2 digit.
Thanks & Regards
Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
It worked using picture statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that's good to hear.
I never realized this particular deficiency of the DATETIME. format: you can't chop off the seconds and get 4 digits years.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
But if we create a picture format apply the format it converts the variable into a numeric variable not a date variable. Do you have any way to overcome this so that the variable should remain a Date variable after we apply the user defined format.