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

How to create a month field from existing date

How do I set a month value from an existing date value? My data has dates listed as "09 June 2011 11:38:29 EST" All I want is to create a field that would only have the month- "June"

4 Replies
swuehl
MVP
MVP

Maybe like

LOAD

     TimestampField,

     Text(Date(TimestampField,'MMMM')) as MonthName,

     ...

You need to ensure that your Timestamp is correctly read in with a numeric representation, please have a look at

Get the Dates Right

HirisH_V7
Master
Master

Hi,

May be use this,

SubField(TimeStamp,' ',2)  as Month

if you require complete calendar table means, go with stefans suggestion.

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
Not applicable
Author

This worked,but how would I add the year to it? like June 2017

swuehl
MVP
MVP

Maybe

Date(Monthstart(TimestampField),'MMMM YYYY') as MonthYear,