Format Date in database

jnbarban

Member
Licensed User
Longtime User
hi,i have questions about date format in database.

In the table description, the date must be in type Date ? Long (yyyymmdd) ? String ?...

What is the good format ?

the data must by formated like "2011/01/31", "20110131","2011-01-31"... ?

Thanks.
 

derez

Expert
Licensed User
Longtime User
Date format is defined by you, using the letters y for year, M (capital) for month and d for day. You define the string as you wish it to be, for example
DateTime.DateFormat = "dd/MM/yyyy". The separator is up to you also.
Small m is for minutes.
The variable used in datetime methods (the ticks) is of type Long.
 
Last edited:
Upvote 0
Top