View Full Version : How to get the date
Hi all,
How can i convert the string to a date?
Eg:
001 => 1 Jan
.
.
.
032 => 1 Feb
.
.
.
365 => 31 Dec
Thanx in advance..
XLGibbs
01-27-2006, 01:01 PM
use the Format function and date function..
Format(DateSerial(year(now(),1,1) + [your field with day number] - 1,"d mmm")
Or this one:
DateAdd(d,[your day number]-1,#1/1/2006#) if the year won't change.
There are lots of date functions, you just to have use your day field as the "Day" part of the expression, then format as "d mmm" to get the requested output.
Hope that helps.
Bob Phillips
02-23-2006, 01:46 AM
You can even take advantage of the peculiar date processing of office, that can calculate the nth day of a month, even where n > 31
format(dateserial(Year(Date),1,[your field with day number] ),"dd mmm yyyy")
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.