I feel somewhat embarrassed asking this, as its going to be blindingly obvious, but i can't get todays date to show, or update.
I need a Julian date so I can subtract one date from another date held in the database to get a date difference. Both dates are / will be created using the same Today calculation.
I have read and tried all the posts here, and I can get the program to generate a number, only it never updates.
For example this structure is right out of the manual but it gives 1, every day I run it.
Other times it gave a number of 700101 when I used yymmdd for the format. But no matter what format I used it never gave a number that changed every day.
Dim now As Long
Dim today As String
DateTime.DateFormat = "dddd"
today = DateTime.Date(now)
lbltoday.text = today
Even using Dim today As Long makes no difference.
What am I doing wrong?
I need a Julian date so I can subtract one date from another date held in the database to get a date difference. Both dates are / will be created using the same Today calculation.
I have read and tried all the posts here, and I can get the program to generate a number, only it never updates.
For example this structure is right out of the manual but it gives 1, every day I run it.
Other times it gave a number of 700101 when I used yymmdd for the format. But no matter what format I used it never gave a number that changed every day.
Dim now As Long
Dim today As String
DateTime.DateFormat = "dddd"
today = DateTime.Date(now)
lbltoday.text = today
Even using Dim today As Long makes no difference.
What am I doing wrong?
Last edited: