September 1, 2009 at 9:51 am
Hi again,
I have a field which is a datetime vaule and i would to show it ion a different format....
2009-09-01 00:00:00.000 is how it appears now
010909 is how i would like it to appear..... any ideas??
Cheers guys!!
Sam Marsden
September 1, 2009 at 10:18 am
sam.marsden (9/1/2009)
Hi again,I have a field which is a datetime vaule and i would to show it ion a different format....
2009-09-01 00:00:00.000 is how it appears now
010909 is how i would like it to appear..... any ideas??
Cheers guys!!
First, why?
September 1, 2009 at 3:46 pm
I need to have the date in that format to save in a Csv file that will be imported into sage later. Safe is being really funny about the formats of things...
Sam Marsden
September 1, 2009 at 4:13 pm
select replace(convert(varchar(8),getdate(),5),'-','');
Try the above.
September 2, 2009 at 1:53 am
Thanks that looks great - i'll give it a try later and let you know how it goes.
Sam Marsden
September 3, 2009 at 2:43 am
Works like a dream,
Thanks Lynn
Sam Marsden
September 4, 2009 at 5:35 am
One and too
select replace(convert(varchar(8),cast('2009-09-01 00:00:00.000'as datetime),5),'-','');
Thanks Lynn
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply